<template>
	<view>
		<z-paging ref="paging" v-model="dataList" @query="getDataListAll" :show-loading-more-no-more-view="false">
			<view slot="top">
				<u-navbar title="钱包" placeholder :autoBack="true" leftIconColor="#E6A5B4" bgColor="#000000"
					:titleStyle="titleStyle">
				</u-navbar>
				<view class="moneyV">
					<view class="moneyLeftV">
						<view class="moneyTv1">余额</view>
						<view class="moneyTv2">{{info.money}}</view>
					</view>
					<view class="moneyTv3" @click="onRechargeClick">充值</view>
				</view>
				<view class="titleTv">账户明细</view>
			</view>
			<view :class="index%2==0?'itemVTo':'itemV'" v-for="(item,index) in dataList" :key="index">
				<view class="itemLeftV">
					<view class="itemTv1">{{item.memo}}</view>
					<view class="itemTv2">{{item.createtime}}</view>
				</view>
				<view class="itemTv3">+{{item.money}}</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				titleStyle: {
					"color": "#ffffff"
				},
				dataList: [],
				info: {}
			}
		},
		onLoad(e) {
			this.info = JSON.parse(e.item);
			// this.getAccount();
		},
		methods: {
			// getAccount() {
			// 	this.$api.getAccount({}).then((res) => {
			// 		this.info = res[0];
			// 	}).catch((e) => {})
			// },
			getDataListAll(pageNo, pageSize) {
				this.$api.getAccountLog({
					page:pageNo,
					shop_id:this.info.shop_id
				}).then((res) => {
					this.$refs.paging.complete(res.list);
				}).catch((e) => {
					this.$refs.paging.complete(false);
				})
			},
			onRechargeClick() {
				this.$u.route({
					url: '/mine/me/OpenVip',
				})
			}
		}
	}
</script>

<style>
	.moneyV {
		margin: 30rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-left: 50rpx;
		padding-right: 50rpx;
		background-color: #1f1f1f;
		border-radius: 10rpx;
	}

	.moneyLeftV {
		height: 152rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.moneyTv1 {
		font-size: 32rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
	}

	.moneyTv2 {
		font-size: 50rpx;
		font-family: PingFangSC-Semibold, PingFang SC;
		font-weight: 600;
		color: #CEF44F;
	}

	.moneyTv3 {
		height: 80rpx;
		background: #CEF44F;
		border-radius: 40rpx;
		font-size: 32rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #303B13;
		padding-left: 50rpx;
		padding-right: 50rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.titleTv {
		margin-top: 50rpx;
		font-size: 32rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #7E7E7E;
		margin-left: 30rpx;
		padding-bottom: 30rpx;
	}

	.itemV {
		height: 130rpx;
		margin-left: 30rpx;
		margin-right: 30rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		background-color: #FFFFFF;
	}

	.itemVTo {
		height: 130rpx;
		margin-left: 30rpx;
		margin-right: 30rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		background-color: #1f1f1f;
	}

	.itemLeftV {
		display: flex;
		flex-direction: column;
	}

	.itemTv1 {
		font-size: 32rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
	}

	.itemTv2 {
		font-size: 24rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #7E7E7E;
		margin-top: 10rpx;
	}

	.itemTv3 {
		font-size: 36rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #EA7979;
	}
</style>